<%-- 
    Created on : 2019
    Author     : 黄忠
--%>

<%@page import="lookMessage.LookMessageBean"%>
<%@page import="loginRegister.LoginBean"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<%@ page errorPage="../error.jsp" %>
<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>个人信息管理系统--查看个人信息</title>
        <link rel="stylesheet" href="../CSS/infor.css">
    </head>
        <body bgcolor="CCCFFF">
            <br><br>
            <form action="/upload" enctype="multipart/form-data" method="post">
            <table id="recruit" border="2" cellspacing="0" cellpadding="0" bgcolor="#95BDFF" align="center">
            <%
                LookMessageBean mm=(LookMessageBean)session.getAttribute("wordlist");
                LoginBean login = (LoginBean)session.getAttribute("login");
                if(mm==null){
                    response.sendRedirect("http://localhost:8080/main/bottom.jsp");
                }else{
                    String picture = "dgut.jpg";
                    if (!mm.getPicture().equals("dgut.jpg"))picture =login.getUserName()+"/"+ mm.getPicture();
                    String mes = "";
                    String href = "";
                    if(mm.getDgut_username()==null){mes = "绑定";href = "/login/dgut";}
                    else {mes = "解除绑定";href = "/login/unbind";}
             %>
                <tr>
                    <td height="30">用户姓名</td>
                    <td colspan="2"><%=mm.getName()%></td>
                    <td rowspan="5" style="text-align: center;overflow: hidden;vertical-align: middle;width: 120px;">
                        <div>
                            <a href="" title="更换头像">
                                <label for="tx">
                                    <img width="140px" height="140px" src="/TXImages/<%=picture%>" alt="头像">
                                </label>
                                <input style="opacity:0;width:0px;height:0px;" required="required" type="file" name="picture" id="tx">
                            </a>
                        </div>
                        <div>
                            <input style="background-color:#ffffff00;border: none;color:#03a9f4;" type="submit" name="uploadImage" value="保存头像">
                        </div>
                    </td>
                </tr>
                <tr>
                    <td height="30">用户性别</td>
                    <td colspan="2"><%=mm.getSex()%></td>
                </tr>
                <tr>
                     <td height="30">出生日期</td>
                    <td colspan="2"><%=mm.getBirth()%></td>
                </tr>
                <tr>
                     <td height="30">用户民族</td>
                    <td colspan="2"><%=mm.getNation()%></td>
                </tr>
                <tr>
                     <td height="30">用户学历</td>
                     <td colspan="2"><%=mm.getEdu()%></td>
                </tr>
                <tr>
                     <td height="30">用户职称</td>
                     <td><%=mm.getWork()%></td>
                    <td height="30">月薪</td>
                    <td><%=mm.getMonthPay()%></td>
                </tr>
                <tr>
                     <td height="30">用户电话</td>
                     <td><%=mm.getPhone()%></td>
                    <td height="30">家庭住址</td>
                    <td><%=mm.getPlace()%></td>
                </tr>
                <tr>
                    <td height="30">邮箱</td>
                    <td><%=mm.getEmail()%></td>
                    <td height="30">莞工账号</td>
                    <td><a href=<%=href%>><%=mes%></a></td>
                </tr>
               <%

                }
            %>
        </table>
            </form>
    </body>
</html>
